package com.zzl.bonds.ticket.dto.feign;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.zzl.apidoc.annotation.ApidocModel;
import com.zzl.apidoc.annotation.ApidocModelProperty;
import com.zzl.general.common.utils.DoubleToPercentSerialize;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 金融产品
 *
 * @author wztsl
 * @date 2021-12-22 19:40:27
 */
@Data
@TableName("b_financial_product")
@ApidocModel
public class FinancialProductEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.UUID)
    @ApidocModelProperty(description = "主键")
    private Integer id;
    @ApidocModelProperty(description = "金融机构id")
    private Integer financeInstitutyId;
    @ApidocModelProperty(description = "产品名称")
    private String productName;
    @ApidocModelProperty(description = "产品标识")
    private String productCode;
    @ApidocModelProperty(description = "金融产品计算脚本")
    private String scriptCode;
    @ApidocModelProperty(description = "产品描述")
    private String description;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApidocModelProperty(description = "创建时间", validate = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApidocModelProperty(description = "修改时间", validate = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
    @ApidocModelProperty(description = "创建人")
    private Integer creatorId;
    @ApidocModelProperty(description = "修改人")
    private Integer updaterId;
    @ApidocModelProperty(description = "备注")
    private String remark;
    @ApidocModelProperty(description = "排序字段")
    private Integer sort;
    @TableField(value = "is_deleted", fill = FieldFill.INSERT)
    @TableLogic(value = "0", delval = "1")
    @ApidocModelProperty(description = "is_delete")
    private Integer isDeleted;
    @ApidocModelProperty(description = "融资利率是否年化,0：否，1:是")
    private Integer isAnnualizedInterestRate;
    @ApidocModelProperty(description = "融资利率")
    @JsonSerialize(using = DoubleToPercentSerialize.class)
    private Double annualizedInterestRate;
    @ApidocModelProperty(description = "平台服务费率")
    @JsonSerialize(using = DoubleToPercentSerialize.class)
    private Double platServiceRate;
    @ApidocModelProperty(description = "平台服务费率是否年化，0 否，1 是")
    private Integer isAnnualizedPlatServiceRate;
    @ApidocModelProperty(description = "宽限期是否计息，0 否，1 是")
    private Integer isGraceCost;
    @ApidocModelProperty(description = "宽限天数")
    private Integer graceDays;
    @ApidocModelProperty(description = "业务方式 1 无追索权")
    private Integer businessMode;
    @ApidocModelProperty(description = "用章类型 1 公章")
    private Integer sealType;
    @ApidocModelProperty(description = "业务类型 1 公开型")
    private Integer businessType;
}
